package com.demo.oauth.exceptions;

import org.springframework.security.oauth2.common.exceptions.OAuth2Exception;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import lombok.Getter;

/**
* @author yangjian
* @version 创建时间：2022年2月14日 下午2:19:24
* 
*/
@JsonSerialize(using = MyAuth2ExceptionSerializer.class)
public class MyAuth2Exception extends OAuth2Exception{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	@Getter
	private Integer errorCode;

	public MyAuth2Exception(String msg) {
		super(msg);
	}

	public MyAuth2Exception(String msg, int errorCode) {
		super(msg);
		this.errorCode = errorCode;
	}

}
